class Solution(object):
    def addTwoNumbers(self, l1, l2):
        """
        :type l1: ListNode
        :type l2: ListNode
        :rtype: ListNode
        """
        l1_reverse = list(reversed(l1))
        l2_reverse = list(reversed(l2))
        list1 = [str(x) for x in l1_reverse]
        list2 = [str(x) for x in l2_reverse]
        sum = int(''.join(list1)) + int(''.join(list2))
        list_res = list(map(int, list(str(sum))[::-1]))
        return list_res


if __name__ == '__main__':
    print(Solution().addTwoNumbers([2, 4, 3], [5, 6, 4]))
